Streams related Class
Renders a bunch of Stream/preview tools for streams related to the given stream. Has options for adding new related streams, as well as sorting the relations, etc. Also can integrate with Q/tabs tool to render tabs "related" to some category.
Constructor
Streams related
-
$options
-
[options.toolName]
Parameters:
-
$options
Arrayoptions for the tool
-
[publisherId]
String optionalEither this or "stream" is required. Publisher id of the stream to which the others are related
-
[streamName]
String optionalEither this or "stream" is required. Name of the stream to which the others are related
-
[tag="div"]
String optionalThe type of element to contain the preview tool for each related stream.
-
[stream]
String optionalYou can pass a Streams_Stream object here instead of "publisherId" and "streamName"
-
[relationType=""]
String optionalThe type of the relation.
-
[isCategory=true]
Boolean optionalWhether to show the streams related TO this stream, or the ones it is related to.
-
[relatedOptions]
Array optionalCan include options like 'limit', 'offset', 'ascending', 'min', 'max', 'prefix' and 'fields'
-
[editable]
Boolean optionalSet to false to avoid showing even authorized users an interface to replace the image or text
-
[creatable]
Array optionalOptional pairs of {streamType: toolOptions} to render Streams/preview tools create new related streams. The params typically include at least a "title" field which you can fill with values such as "New" or "New ..."
-
[realtime=false]
Boolean optionalWhether to refresh every time a relation is added, removed or updated by anyone
-
[sortable]
Array optionalOptions for "Q/sortable" jQuery plugin. Pass false here to disable sorting interface. If streamName is not a String, this interface is not shown.
-
[tabs]
String optionalName of a cuntion for interacting with any parent "Q/tabs" tool. Format is function (previewTool, tabsTool) { return urlOrTabKey; }
-
[updateOptions]
Array optionalOptions for onUpdate such as duration of the animation, etc.
-
[onUpdate]
String optionalName of a handler for event that receives parameters "data", "entering", "exiting", "updating"
-
[onRefresh]
String optionalName of a handler for event that occurs when the tool is completely refreshed, the "this" is the tool
-
-
[options.toolName]
Function optionalOptionally name a function that takes (streamType, options) and returns the name of the tool to render (and then activate) for that stream. That tool should reqire the "Streams/preview" tool, and work with it as documented in "Streams/preview".